﻿using System;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020000E7 RID: 231
	public class SlowMo : MonoBehaviour
	{
		// Token: 0x06000695 RID: 1685 RVA: 0x000063B1 File Offset: 0x000045B1
		public void Update()
		{
			Time.timeScale = ((!this.IsSlowMotion()) ? 1f : this.slowMoTimeScale);
		}

		// Token: 0x06000696 RID: 1686 RVA: 0x0003B570 File Offset: 0x00039770
		public bool IsSlowMotion()
		{
			if (this.mouse0 && Input.GetMouseButton(0))
			{
				return true;
			}
			if (this.mouse1 && Input.GetMouseButton(1))
			{
				return true;
			}
			for (int i = 0; i < this.keyCodes.Length; i++)
			{
				if (Input.GetKey(this.keyCodes[i]))
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x04000616 RID: 1558
		[SerializeField]
		public KeyCode[] keyCodes;

		// Token: 0x04000617 RID: 1559
		[SerializeField]
		public bool mouse0;

		// Token: 0x04000618 RID: 1560
		[SerializeField]
		public bool mouse1;

		// Token: 0x04000619 RID: 1561
		[SerializeField]
		public float slowMoTimeScale = 0.3f;
	}
}
